Title: All Tags
---
<div class="container-sm-height">
    <div class="row row-sm-height">		
        <div class="col-sm-12 col-sm-height">            
            @foreach (IDocument tagDocument in Documents[Blog.Tags]
                .GroupBy(x => x.String(BlogKeys.Tag)).Select(x => x.Where(p => p.Get<int>(Keys.CurrentPage) == 1).First())
                .OrderByDescending(x => x.Get<int>(Keys.TotalItems)))
            {
                string tag = tagDocument.String(BlogKeys.Tag);
                string postCount = tagDocument.String(Keys.TotalItems);
                <a role="button" href="@Context.GetLink(tagDocument)" class="btn btn-default btn-sm"> @tag (@postCount)</a>
            }
        </div>
    </div>
</div>